<?php
include_once("inc/PRedirectSection.inc");
/**     The CurrentIssue class is designed to model a section that redirects to the current issue.
	*       \latexonly \label{PWision:Extensions:Newspaper:CurrentIssue}  \index{issue} \endlatexonly
	*       \brief the <i>CurrentIssue</i> section.
	*       \version 1.0.1
	*/
class CurrentIssue extends PRedirect2Section
	{
	function CurrentIssue()
		{
		$NArticle=Main()->DB->fetch_array_query("SELECT * FROM `NArticle`  ORDER BY Volume+0  DESC, `Issue`+0 DESC, `firstPage`+0, `lastPage`+0 DESC, `ID` LIMIT 1");
		PRedirect2Section::PRedirect2Section(
			"Article",
			Object(new PURLAttributes)
							->setAtr('ID',$NArticle['ID'])
			);
		}
	}
?>